import AccessTokenService from '../service/accessTokenService'
import { createUUID } from '../src/utils_random/生成UUID'

class AccessTokenController {

  async getAccessToken(key) {
    console.log('测试key:',key)
    const res = await AccessTokenService.getAccessToken(key)
    console.log('测试res1:', res)
  }
  async setAccessToken(value) {
    
    const key = createUUID()[0]
    const res = await AccessTokenService.setAccessToken(key, value)
    console.log('测试res1:', res)
  }

  // async userLogout(userSession) {
  //   await AccessTokenService.removeAccessToken(userSession)
  // }

  // async userOther(userSession) {
  //   const res = await AccessTokenService.getAccessToken(userSession)
  //   console.log('测试res2:', res)
  //   await AccessTokenService.resetAccessToken(userSession)
  // }
}

export default new AccessTokenController()
